www.gusucode.com > 婚庆仪礼策划公司网站系统源代码 梦紫色 > 婚庆仪礼策划公司网站系统源代码 梦紫色/Admin/admin_link.asp

    
<!--#include file="conn.asp"-->
<!--#include file="inc/format.asp"-->
<!--#include file="inc/error.asp"-->
<!--#include file="check1.asp"-->
<%if session("admin_flag")<>"into" then
	  founderr=true
	  errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='login.asp' target='_parent'>重新登录</a>!"
	  Call diserror()
	  response.End
  end if
  %>
<html>

<head>
<!--#include file = language.asp -->
<title>新建网页 1</title>
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>

<body bgcolor="#ffffff">

<div align="center">
	<table border="0" width="600" id="table1">
		<tr>
			<td> </td>
		</tr>
		<tr>
			<td>
			<p align="center"><b><!--<a href="admin_link_code.asp">
			<span style="font-size: 10.5pt">友情链接调用</span></a> --></b></td>
		</tr>
		<tr>
			<td>
<%
if request("edit")="1" and request("id")<>"" then
  sql = "select * from link where id="&request("ID")
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  if rs.recordcount<>0 then
  	eid=rs("id")
  	elinkname=rs("linkname")
  	eurl=rs("url")
  	elb=rs("lb")
  	elogo=rs("logo")
  	ejs=rs("js")
  	epic=rs("pic")
  end if
end if

if (not isNumeric(epic)) then
	epic=0
end if
%>
			<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="VBScript" Type="text/vbscript"><!--
function FrontPage_Form1_onsubmit()
  Set theForm = document.FrontPage_Form1

  If (theForm.linkname.value = "") Then
    MsgBox "请在 网站名称 域中输入值。", 0, "有效性验证错误"
    theForm.linkname.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.linkname.value) < 1) Then
    MsgBox "在 网站名称 域中,请至少输入 1 个字符。", 0, "有效性验证错误"
    theForm.linkname.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.linkname.value) > 255) Then
    MsgBox "在 网站名称 域中,请最多输入 255 个字符。", 0, "有效性验证错误"
    theForm.linkname.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.url.value = "") Then
    MsgBox "请在 网站地址 域中输入值。", 0, "有效性验证错误"
    theForm.url.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.url.value) < 10) Then
    MsgBox "在 网站地址 域中,请至少输入 10 个字符。", 0, "有效性验证错误"
    theForm.url.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If
  FrontPage_Form1_onsubmit = True 
End Function
--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="admin_link_add_save.asp?id=<%=eid%>" name="FrontPage_Form1">
				<table border="1" width="100%" id="table2" cellspacing="0" cellpadding="3" style="border-collapse: collapse" bordercolor="#C0C0C0">
					<tr>
						<td align="left" background="../images/topBar_bg.gif" colspan="2">&nbsp;<b>添加/修改友情链接
						          </b></td>
					</tr>
					<tr>
						<td width="98" align="center">网站名称</td>
						<td>
						&nbsp;<!--webbot bot="Validation" s-display-name="网站名称" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="255" --><input type="text" name="linkname" size="31" value='<%=elinkname%>' maxlength="255"></td>
					</tr>
					<tr>
						<td width="98" align="center">网站地址</td>
						<td>
						&nbsp;<!--webbot bot="Validation" s-display-name="网站地址" b-value-required="TRUE" i-minimum-length="10" --><input type="text" name="url" size="42" value='<%=eurl%>'></td>
					</tr>
					<tr>
						<td width="98" align="center">网站分类</td>
						<td>
						&nbsp;<select size="1" name="lb">
						<option value="">请选择</option>
						<%
						lbid=elb
						if (not isNumeric(LBID)) then
							lbid=0
						end if
						
						set rs2 = Server.CreateObject("ADODB.RecordSet")
						rs2.Open "select * from [LINKLB] order by id asc",conn,1,1
						while not rs2.eof
						%>
						<option <% if clng(lbid)=clng(rs2("id")) then Response.Write " selected "%> value="<%=rs2("ID")%>"><%=rs2("lb")%></option>
						<%
						rs2.movenext
						wend
						rs2.close
						set rs2=nothing
						%>
						</select></td>
					</tr>
					<tr>
						<td width="98" align="center">网站LOGO</td>
						<td>
						&nbsp;<input type="text" name="logo" size="52" value='<%=elogo%>'> 图片 宽:88 高:31</td>
					</tr>
					<tr>
						<td width="98" align="center">网站介绍</td>
						<td>
						&nbsp;<input type="text" name="js" size="52" value='<%=ejs%>'></td>
					</tr>
					<tr>
						<td width="98" align="center">有无图片</td>
						<td>
						&nbsp;<input type="radio" value="1" <% if clng(epic)=1 then Response.Write " checked "%> name="PIC" id=pic1><label for=pic1>有LOGO</label>
						<input type="radio" name="PIC" <% if clng(epic)=0 then Response.Write " checked "%> value="0" id=pic2><label for=pic2>没有LOGO</label></td>
					</tr>
					<tr>
						<td align="center" colspan="2"><input type="submit" value="保存" name="B1">   <input type="reset" value="重置" name="B2"></td>
					</tr>
				</table>
			</form>
			</td>
		</tr>
	</table>
</div>
<%
id=trim(request("id"))
ontop=trim(request("ontop"))
upd=trim(request("upd"))
addtime=date()

if ontop<>"" then
  conn.Execute "update [link] set ontop="&ontop&" where id="&clng(id)
elseif upd<>"" then
  conn.Execute "update [link] set upd='"&addtime&"' where id="&clng(upd)
end if
  sql = "select * from link order by ontop desc , upd desc , id desc"
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  
%>
<div align="center">
	<table border="1" id="table3" width=760 cellpadding="3" style="border-collapse: collapse" cellspacing="0">
		<tr>
			<td align="center" background="../images/topBar_bg.gif"><b>LOGO</b></td>
			<td align="center" background="../images/topBar_bg.gif"><b>网站名称</b></td>
			<td align="center" background="../images/topBar_bg.gif"><b>分类</b></td>
			<td align="center" background="../images/topBar_bg.gif"><b>操 作</b></td>
		</tr>
<%
if rs.recordcount<>0 then

page=int(request.QueryString ("page"))
rs.PageSize=20
pagecount=rs.pagesize
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
   for i=0 to pagecount
     ontop=rs("ontop")
     if ontop="" then ontop=3
     if ontop="3" then 
       ontop=5
     else
       ontop=3
     end if
%>
		<tr>
			<td align=center style="table-layout:fixed;word-break:break-all" height="25">
			<%
			if trim(rs("logo"))<>"" then
			   response.write "<a href="&rs("url")&" target=_blank title='"&rs("js")&"'><img border=0 width=88 height=31 src=" & rs("logo") & "></a>"
			end if
			%></td>
			<td height="25" align=center><a href="<%=rs("url")%>" title='<%=rs("url")%>' target=_blank>
<%=rs("linkname")%></a></td>
			<td align=center height="25"><%if rs("ontop")="5" then Response.Write "<b><font color=blue>[顶]</font></b>"%>
			<%
			set rs2 = Server.CreateObject("ADODB.RecordSet")
			rs2.Open "select * from [LINKLB] where [ID]="&rs("lb")&" order by id desc",conn,1,1
			if rs2.recordcount<>0 then
				Response.Write rs2("lb")
			end if
			rs2.close
			set rs2=nothing
			%>
			</td>
			<td height="25">
			<p align="center"><a href="admin_link.asp?id=<%=rs("id")%>&edit=1">修改</a><!-- <a href=admin_link.asp?ontop=<%=ontop%>&id=<%=rs("id")%>>固顶</a> <a href=admin_link.asp?upd=<%=rs("id")%>>提升</a>  -->
			<a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="admin_link_del.asp?id=<%=rs("id")%>">删除</a></td>
		</tr>
<%
 Response.flush 
 rs.movenext
 if rs.eof then exit for
 next

end if
%>
	</table>
</div><br>
<center>
<%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1>首页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&">上一页</a> "
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&">下一页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&">尾页</a> "
  end if
    response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
  %>
  <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
  </script>
  <select size="1" onChange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
   <%for i=1 to rs.pagecount%>
   <option value="<%=request.servervariables("URL")%>?page=<%=i%>" <%if page=i then response.write "selected"%>>第<%=i%>页</option>
    <%next%>
   </select>
<%end if%>
</center>
</body>
<%
conn.close
set conn=nothing
%>
</html>